package cn.hzc.fortess.system.dao;

import cn.hzc.fortess.system.entity.Lessee;
import cn.hzc.fortess.system.search.LesseeSearch;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LesseeDao {


    int delete(Integer id);

    int deleteRelationByLessee(Integer id);

    int insert(Lessee record);

    int saveRefProject(@Param("projectId") Integer projectId,@Param("lesseeId")  Integer lesseeId);

    int clearRefProject(Integer lesseeId);

    Lessee findById(Integer id);

    int update(Lessee record);

    List<Integer> getRefProjectByLesseeId(Integer id);

    List<String> getRefProjectNamesByLesseeId(Integer id);

    List<Lessee> getByProjectId(Integer projectId);


    List<Lessee> page(LesseeSearch search);

    long count(LesseeSearch search);


}